import { Injectable } from '@angular/core';
import { environment } from 'src/environments/environment';
import { HttpClient, HttpParams } from '@angular/common/http';
@Injectable({
  providedIn: 'root'
})
export class KanbanService {

  constructor(private http: HttpClient) { }
    apiUrl = environment.apiUrl;
  getInventoryStatistics() {
    return this.http.get(`${this.apiUrl}/Warehouse/GetWarehouseInventoryInOrOutStatistics`);
  }
  getWarehouseData() {
    return this.http.get(`${this.apiUrl}/Warehouse/GetWarehouseData`);
  }
  getJobOrderKanbanData() {
    return this.http.get(`${this.apiUrl}/jobOrder/GetJobOrderKanBanData`);
  }
  getJobOrderProcessCount() {
    return this.http.get(`${this.apiUrl}/jobOrder/GetJobOrderProcessCount`);
  }
  getReportingQualifiedRate() {
    return this.http.get(`${this.apiUrl}/jobOrder/GetReportingPassRate`);
  }

  getJobOrderProcessYearCount() {
    const currentYear = new Date().getFullYear(); // 获取当前年份
  return this.http.get(`${this.apiUrl}/JobOrder/GetAnnualJobOrderProcessCount?year=${currentYear}`);
  }
  getCompletedQuantityWeek() {
    return this.http.get(`${this.apiUrl}/jobOrder/GetCompletedQuantityWeek`);
  }
  getPausedReason() {
    return this.http.get(`${this.apiUrl}/jobOrder/GetPausedReasons`);
  }
  getJobOrderProcessLog() {
    return this.http.get(`${this.apiUrl}/jobOrder/GetJobOrderProcessLog`);
  }

}
